import request from '@/utils/request'

export function login(data) {
  return request({
    mock: true,
    url: '/user/login',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    mock: false,
    url: '/proxy/sys/user/current',
    method: 'get'
  })
}

// export function getInfo() {
//   return request({
//     mock: true,
//     url: '/proxy/user/info',
//     method: 'get'
//   })
// }

export function logout() {
  return request({
    mock: true,
    url: '/user/logout',
    method: 'post'
  })
}

// 获取菜单权限数据
export function queryUserMenu(data) {
  return request({
    mock: false,
    url: `/proxy/sys/menu/usermenu/query`,
    method: 'POST',
    data,
    requestType: 'form'
  })
}
